//
//  HJNewsTabModel.m
//  KaiChat
//
//  Created by lx on 2024/3/14.
//

#import "HJNewsTabModel.h"

@implementation HJNewsTabModel

+ (HJNewsTabModel *)modelWithDict:(NSDictionary *)dict {
    HJNewsTabModel *model = [[HJNewsTabModel alloc] init];
    model.tagID = [dict[@"tag_id"] intValue];
    model.tagName = dict[@"tag_name"];
    CGSize textSize = [model.tagName boundingRectWithSize:CGSizeMake(KScreenWidth - leftRightMargin * 2, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: UIFontMake(12)} context:nil].size;
    model.textSize = CGSizeMake(ceil(textSize.width) + 30, 28);
    return model;
}


@end
